#ifndef MQTTTESTER_H
#define MQTTTESTER_H

#include "Graphs/MyCharts/graph.h"
#include "Graphs/MyCharts_v2/mychart.h"
#include "Mqtt/Client/mymqtt.h"
#include "keyboard.h"
#include <QWidget>

QT_BEGIN_NAMESPACE
namespace Ui {
class MqttTester;
}
QT_END_NAMESPACE

class MqttTester : public QWidget
{
    Q_OBJECT

public:
    MqttTester(QWidget *parent = nullptr);
    ~MqttTester();

private:
    Ui::MqttTester *ui;
    MyMqtt *mqttClient;
    Graph *graph;
    MyChart *chart;
    Keyboard *keyboard;

    void initMqttClient(QString ip, uint port, QString name, QString pass);
    void setupGraph();

public slots:
    void drawWideGraph(QList<float> &newData);

private slots:
    void getPressedBtn(QString btnCaption);

};
#endif // MQTTTESTER_H
